package com.hzdesk.media.koreabatchmatvector.request;

import android.content.Context;
import android.util.Log;

import com.hzdesk.media.koreabatchmatvector.bean.CloudFile;
import com.hzdesk.media.koreabatchmatvector.inter.ICallBack;

import java.util.List;


/**
 * Created by Administrator on 2018/5/25.
 */

public class GetCloudFileListRequest {
    private static final String TAG=GetCloudFileListRequest.class.getSimpleName();
    private Model model = Model.getInstance();
    private Context context;
    private String Url;

    public GetCloudFileListRequest(Context context, String url) {
        this.context = context;
        Url = url;
    }

    public interface OnGetCloudFileListListener{
        void success(List<CloudFile> list);
        void fail(String s);
    }
    private OnGetCloudFileListListener onGetCloudFileListListener;

    public void setOnGetCloudFileListListener(OnGetCloudFileListListener onGetCloudFileListListener,int page){
        this.onGetCloudFileListListener=onGetCloudFileListListener;
        getRequest(Url+"/"+page);
    }
    public void getRequest(String url) {
        Log.d(TAG,url);
        model.getSynchronized(context, url, new ICallBack() {
            @Override
            public void result(String s) {
                System.out.println(s);

            }
        });
    }



}
